#ifndef _CRAB_PLATFORM_H_INCLUDED_
#define _CRAB_PLATFORM_H_INCLUDED_

#ifdef _MSC_VER
#pragma once
#endif // _MSC_VER

// determine compilers
#if defined _MSC_VER
#  define CRAB_COMPILER_MSVC 1
#endif

#if defined __GNUC__
#  define CRAB_COMPILER_GCC 1
#endif

// determine the target OS
// GS_OS_UNIX
#if !defined(CRAB_OS_WIN32) && !defined(CRAB_OS_UNIX)

#endif
// GS_OS_WIN32
#if defined _WIN32 || defined WIN32 || defined __NT__ || defined __WIN32__
#   define CRAB_OS_WIN32 1
#endif

#if defined linux || defined __linux__
#  define CRAB_OS_LINUX 1
#  define CRAB_OS_UNIX  1
#endif

// imports/exports
#if defined(CRAB_OS_WIN32)
#   define CRAB_EXPORT_DECL __declspec(dllexport)
#   define CRAB_IMPORT_DECL __declspec(dllimport)
#   define CRAB_EXPORT_FUNC
#elif defined(CRAB_OS_UNIX) && defined(GS_COMPILER_GCC)
#   define CRAB_EXPORT_DECL __attribute__ ((visibility("default")))
#   define CRAB_IMPORT_DECL __attribute__ ((visibility("default")))
#   define CRAB_EXPORT_FUNC __attribute__ ((visibility("default")))
#else
#   define CRAB_EXPORT_DECL
#   define CRAB_IMPORT_DECL
#endif

#endif /*_CRAB_PLATFORM_H_INCLUDED_*/
